package com.lhy.common.web.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@Schema(title = "SimpleSort", description = "排序对象参数")
public class SimpleSort {

    @NotBlank
    @Schema(description = "字段名称")
    String name;

    @Schema(description = "order 可选值为 asc 或者 desc")
    @Pattern(regexp = "asc|desc")
    String order = "asc";
}